/**
 * @file common.hpp
 * @ingroup engineMod
 *
 * @brief Contains the common includes and some useful macros.
 *
 * Generally all other files includes this to avoid writing lots of
 * \#includes statements. In this file is also the place of general
 * documentation.
 **/
#ifndef WOLF_COMMON_HPP
#define WOLF_COMMON_HPP

#include <SDL.h>
#include <SDL_ttf.h>

/**
 * @def WOLF_FOR
 * @brief expands to an for block that iterates over a container
 *
 * It just exists to turn more easy the task of iterate. Use like that:
 * @code
 * WOLF_FOR(vector<int>, myVector, it)
 * {
 *    cout << *it << endl;
 * }
 * @endcode
 * instead that:
 * @code
 * for(vector<int>::iterator it = myVector.begin(); it != myVector.end(); ++it)
 * {
 *    cout << *it << endl;
 * }
 * @endcode
 * And you'll have the same effect with less coding.
 *
 * @param TYPE The container class type (e.g. vector<int> ).
 * @param VAR The container variable to be iterated.
 * @param ITER The iterator variable.
 **/
#define WOLF_FOR(TYPE,VAR,ITER) for(TYPE::iterator ITER = VAR.begin(); ITER != VAR.end(); ++ITER)

/**
 * @def WOLF_RFOR
 * @brief expands to an for block that iterates over a container on reverse order
 *
 * It have the same use than WOLF_FOR, but on reverse order.
 *
 * @see WOLF_FOR
 *
 * @param TYPE The container class type (e.g. vector<int> ).
 * @param VAR The container variable to be iterated.
 * @param ITER The iterator variable.
 **/
#define WOLF_RFOR(TYPE,VAR,ITER) for(TYPE::reverse_iterator ITER = VAR.rbegin(); ITER != VAR.rend(); ++ITER)

#ifdef WOLF_TEST
 #define WOLF_DECLSPEC
#elif defined(WOLF_DLL_BUILD)
 #define WOLF_DECLSPEC __declspec(dllexport)
#else
 #define WOLF_DECLSPEC __declspec(dllimport)
#endif


//#define WOLF_DECL

#endif // WOLF_COMMON_HPP

